﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;

public partial class user_user_validate : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string uid = this.Request["uid"].ToString();

        TUser oUser = new TUser(uid);
        oUser.Select();
        if (oUser.Status > 1)
        {
            msg.Text = "验证失败,该邮件地址已被禁用！";
        }
        else
        {
            oUser.Status = 1;
            oUser.Update_status();
            
            //新建对应的文件夹，用来保存fckediter上传的文件------------------
            string rootdir = "d:\\www\\easycrm\\uploadfiles\\";
            string newfolder = rootdir + oUser.EMail;
            Directory.CreateDirectory(newfolder);
            //---------------------------------------------------------------

            msg.Text = "验证成功！";
        }
    }
}
